import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { RoomItemWrapper } from './style'

const RoomItem = memo((props) => {
  const { itemData, itemHeight, itemWidth } = props
  return (
    <RoomItemWrapper className='RoomItemWrapper'
      verifyColor={"#39576a"}
      verifyWidth={itemWidth || "270px"}
      verifyHeight={itemHeight || "256px"}
    >
      <div className="img">
        <img src={itemData.image} alt="" />
        <div className="img-title">
          <div className="icon">
            <img src={0} alt="" />
          </div>
          <div className="subtitle">
            大师设计
          </div>
        </div>
      </div>
      <div className="address-clicks">
        <div className="address">
          {itemData.address}
        </div>
        <div className="clicks">
          <div className="icon">*</div>
          999 <span>(27)</span>
        </div>
      </div>
      <div className="title">{itemData.title}</div>
      <div className="price">
        $<span className='t1'>{999}</span>
        <span className='t2'>/晚</span>
      </div>
    </RoomItemWrapper>
  )
})

RoomItem.propTypes = {
  itemData: PropTypes.object,
  itemWidth: PropTypes.string,
  itemHeight: PropTypes.string
}

export default RoomItem